/*
 * Account。java
 *
 * Created Date: 2014年12月5日
 *				
 * Copyright (c)  Centling Technologies Co., Ltd.
 *
 * This software is the confidential and proprietary information of
 *  Centling Technologies Co., Ltd. ("Confidential Information"). You shall not
 * disclose such Confidential Information and shall use it only in accordance
 * with the terms of the license agreement you entered into with
 * Centling Technologies Co., Ltd.
 */

package com.centling.bluecollar.privilege.entity;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.centling.bluecollar.customer.entity.EnterpriseCustomer;
import com.centling.bluecollar.customer.entity.Organization;


/**
 * @author hellsing
 * @version  <br>
 * <p>类的描述</p>
 */
@Entity
@Table(name="t_account")
public class Account {
	
	private int id;
	private String loginName;
	private String userName;
	private String userPassword;
	private Organization organization;
	private String tel;
	private String sex;
	private List<EnterpriseCustomer> enterpriseCustomers;
	private Post post;
	private List<Role> roles;
	private String type;  //管理员1，非管理员2
	private List<Menu> menus;
	private String status;
	
	
	/**
	 * @return the status
	 */
	public String getStatus() {
	
		return status;
	}

	
	/**
	 * @param status the status to set
	 */
	public void setStatus(String status) {
	
		this.status = status;
	}

	/**
	 * @return the id
	 */
	@Id
	@GeneratedValue
	public int getId() {
	
		return id;
	}
	
	/**
	 * @param id the id to set
	 */
	public void setId(int id) {
	
		this.id = id;
	}
	
	/**
	 * @return the post
	 */
	@ManyToOne
	@JoinColumn(name="postId")
	public Post getPost() {
	
		return post;
	}

	
	/**
	 * @param post the post to set
	 */
	public void setPost(Post post) {
	
		this.post = post;
	}
	
	/**
	 * @return the userName
	 */

	public String getUserName() {
	
		return userName;
	}
	
	
	/**
	 * @return the type
	 */

	public String getType() {
	
		return type;
	}

	
	/**
	 * @param type the type to set
	 */
	public void setType(String type) {
	
		this.type = type;
	}

	/**
	 * @param userName the userName to set
	 */

	public void setUserName(String userName) {
	
		this.userName = userName;
	}
	
	/**
	 * @return the userPassword
	 */

	public String getUserPassword() {
	
		return userPassword;
	}
	
	/**
	 * @param userPassword the userPassword to set
	 */
	public void setUserPassword(String userPassword) {
	
		this.userPassword = userPassword;
	}
	
	/**
	 * @return the organization
	 */
	@ManyToOne
	@JoinColumn(name="organizationId")
	public Organization getOrganization() {
	
		return organization;
	}
	
	/**
	 * @param organization the organization to set
	 */
	public void setOrganization(Organization organization) {
	
		this.organization = organization;
	}

	
	/**
	 * @return the tel
	 */

	public String getTel() {
	
		return tel;
	}

	
	/**
	 * @param tel the tel to set
	 */
	public void setTel(String tel) {
	
		this.tel = tel;
	}

	
	/**
	 * @return the sex
	 */

	public String getSex() {
	
		return sex;
	}

	
	/**
	 * @param sex the sex to set
	 */
	public void setSex(String sex) {
	
		this.sex = sex;
	}
	
	/**
	 * @return the enterpriseCustomers
	 */
	@Transient
	public List<EnterpriseCustomer> getEnterpriseCustomers() {
	
		return enterpriseCustomers;
	}

	
	/**
	 * @param enterpriseCustomers the enterpriseCustomers to set
	 */
	public void setEnterpriseCustomers(List<EnterpriseCustomer> enterpriseCustomers) {
	
		this.enterpriseCustomers = enterpriseCustomers;
	}

	
	/**
	 * @return the roles
	 */
	@Transient
	public List<Role> getRoles() {
	
		return roles;
	}

	
	/**
	 * @param roles the roles to set
	 */
	public void setRoles(List<Role> roles) {
	
		this.roles = roles;
	}

	
	/**
	 * @return the loginName
	 */

	public String getLoginName() {
	
		return loginName;
	}

	
	/**
	 * @param loginName the loginName to set
	 */
	public void setLoginName(String loginName) {
	
		this.loginName = loginName;
	}

	
	/**
	 * @return the menus
	 */
	@Transient
	public List<Menu> getMenus() {
	
		return menus;
	}

	
	/**
	 * @param menus the menus to set
	 */
	public void setMenus(List<Menu> menus) {
	
		this.menus = menus;
	}
	
}
